package entity;

import java.awt.Point;

public class ChessBoard {
	public final static int BLACK = 1;
	public final static int WHITE = 2;
	private static int color = 1;
	private static int oppcolor = 2;
	
	private static int[][] chezz = new int[19][19];
	private static Point LastPoint = new Point(-10, -10);
	
	private ChessBoard(){
		
	}
	public static int[][] getChezz(){
		return chezz;
	}
	
	public static boolean drop(int x,int y,int color){
		if(x>18 || y>18 || color>2 || color<1) return false;
		if(chezz[y][x]!=0) return false;
		chezz[y][x] = color;
		LastPoint.setLocation(x, y);
		return true;
	}
	public static void clear(){
		chezz = new int[19][19];
	}
	public static int winOrNot(){
		
		return 0;
	}
	public static void setWhite(){
		color = WHITE;
		oppcolor = BLACK;
	}
	public static void setBlack(){
		color = BLACK;
		oppcolor = WHITE;
	}
	public static int getColor(){
		return color;
	}
	public static int getOppColor(){
		return oppcolor;
	}
	public static Point getLastPoint(){
		return LastPoint;
	}
}
